<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  .aaa{
    width: 200px;
    height: 100px;
    display: flex;
    background-color: red;
    /* text-align: center; */
  }

  /* 主轴居中 */

  .bbb{
    width: 50px;
    height: 50px;

    background-color: #bfa;
  }
</style>
<body>
    <div class="aaa">
      <div class="bbb">帅</div>
    </div>
</body>
</html>